package com.chromatic.competition.model;

import com.google.gson.annotations.SerializedName;

import java.time.LocalDateTime;

public class UserMessage {
    @SerializedName("id")
    private long messageId;
    @SerializedName("senderId")
    private int senderId;
    @SerializedName("receiverId")
    private int receiverId;
    @SerializedName("text")
    private String text;
    @SerializedName("timestamp")
    private String timestamp;

    public UserMessage(long id, int senderId, int receiverId, String text, LocalDateTime timestamp) {
        this.messageId = id;
        this.senderId = senderId;
        this.receiverId = receiverId;
        this.text = text;
        this.timestamp = String.valueOf(timestamp);
    }

    public long getId() {
        return messageId;
    }

    public void setId(long id) {
        this.messageId = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public int getSenderId() {
        return senderId;
    }

    public void setSenderId(int senderId) {
        this.senderId = senderId;
    }

    public int getReceiverId() {
        return receiverId;
    }

    public void setReceiverId(int receiverId) {
        this.receiverId = receiverId;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = String.valueOf(timestamp);
    }
}

